package com.ruoyi.app.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.app.mapper.AppBatteryReminderMapper;
import com.ruoyi.app.domain.AppBatteryReminder;
import com.ruoyi.app.service.IAppBatteryReminderService;

/**
 * 电池提醒Service业务层处理
 * 
 * @author dreamyy
 * @date 2025-11-26
 */
@Service
public class AppBatteryReminderServiceImpl implements IAppBatteryReminderService 
{
    @Autowired
    private AppBatteryReminderMapper appBatteryReminderMapper;

    /**
     * 查询电池提醒
     * 
     * @param id 电池提醒主键
     * @return 电池提醒
     */
    @Override
    public AppBatteryReminder selectAppBatteryReminderById(Long id)
    {
        return appBatteryReminderMapper.selectAppBatteryReminderById(id);
    }

    /**
     * 查询电池提醒列表
     * 
     * @param appBatteryReminder 电池提醒
     * @return 电池提醒
     */
    @Override
    public List<AppBatteryReminder> selectAppBatteryReminderList(AppBatteryReminder appBatteryReminder)
    {
        return appBatteryReminderMapper.selectAppBatteryReminderList(appBatteryReminder);
    }

    /**
     * 新增电池提醒
     * 
     * @param appBatteryReminder 电池提醒
     * @return 结果
     */
    @Override
    public int insertAppBatteryReminder(AppBatteryReminder appBatteryReminder)
    {
        appBatteryReminder.setCreateTime(DateUtils.getNowDate());
        return appBatteryReminderMapper.insertAppBatteryReminder(appBatteryReminder);
    }

    /**
     * 修改电池提醒
     * 
     * @param appBatteryReminder 电池提醒
     * @return 结果
     */
    @Override
    public int updateAppBatteryReminder(AppBatteryReminder appBatteryReminder)
    {
        appBatteryReminder.setUpdateTime(DateUtils.getNowDate());
        return appBatteryReminderMapper.updateAppBatteryReminder(appBatteryReminder);
    }

    /**
     * 批量删除电池提醒
     * 
     * @param ids 需要删除的电池提醒主键
     * @return 结果
     */
    @Override
    public int deleteAppBatteryReminderByIds(Long[] ids)
    {
        return appBatteryReminderMapper.deleteAppBatteryReminderByIds(ids);
    }

    /**
     * 删除电池提醒信息
     * 
     * @param id 电池提醒主键
     * @return 结果
     */
    @Override
    public int deleteAppBatteryReminderById(Long id)
    {
        return appBatteryReminderMapper.deleteAppBatteryReminderById(id);
    }
}
